import request from '@/utils/axios'
import type { Result, CategoryVO } from '@/types'

export const categoryApi = {
  // 获取分类列表
  getList: () => {
    return request.get<Result<CategoryVO[]>>('/article/query/category')
  },

  // 批量添加分类
  batchAdd: (names: string[]) => {
    return request.post<Result<boolean>>('/article/category/batch/add', names)
  },
}
